$def with(the_week_posts, last_week_posts, last_top10, type, path, title)
$:frender.header(tab = 1, title = '本周特惠追踪精选', scripts = ['discount.js'])

<script type="text/javascript">
    $$(function () {
        $$('.rating').stars({'showText': false});
        $$('input[name=email]').value_opr();
        $$('.eml_rss_btn').click(function () {
            $$('#subscribe_form').trigger('submit');
            _gaq.push(['_trackPageview', '/_trc/subscribe?source=discounts']);
            return false;
        });
        $$('#subscribe_form').validator({'message':false});
        $$('[lightning=1]').attr_tag();
        $$('[directing=1]').attr_tag({'tag':'directing'});
    });
</script>

<div id="content">
	<div class="wrap">
		<div class="side_l_box">
            $:frender.discounts.left_nav(type)
		</div>
		<!--side_l_box End-->
		<div class="cnt_box">
			<div class="idx_wp_box">
				<h2 class="wp_tit">
                    <span class="wp_tit_l">
                        $if title == '闪电特惠' or title == '直销特惠':
                            $:title
                        $else:
                            本周特惠追踪精选$:title
                    </span>
					<span class="wp_tit_r"><a href="/help/how-to-selected" style="font-size:12px;" title="如何追踪与筛选？">如何追踪与筛选？</a></span>
				</h2>
                <dl class="idx_tp_lst">
                $if the_week_posts:
                    $ i = 0
                    $ lt = len(the_week_posts.lst)
                    $for post in the_week_posts.lst:
                        $ i += 1
                        $ class_ = ''
                        $if i == lt:
                            $ class_ = ' class="last_one"'
                        <dd$:class_>
                            <span class="idx_tp_l tr mr_10">
                                <b class="price_idx">$:moneyfmt(post.price, initial = post.is_initial_price)</b>
                            </span>
                            <span class="idx_tp_r">
                                <a href="/discounts/$post.id" directing="$post.directing" lightning="$post.lightning"><b>$:post.title</b></a><br />
                                    <div class="rating" rating="$post.price_index" ratio="2"></div>
                                    <em>»$:post.partner_name</em>
                            </span>
                        </dd>
                </dl>
            </div>
			<!--idx_wp_box End-->
            $if last_week_posts and last_week_posts.lst:
			    <div class="idx_wp_box">
				    <h2 class="wp_tit">
					    <span class="wp_tit_l">仍有效的往期特惠精选</span>
					    <span class="wp_tit_r"></a></span>
				    </h2>
				    <dl class="idx_tp_lst">
                        $ i = 0
                        $ lt = len(last_week_posts.lst)
                        $for post in last_week_posts.lst:
                            $ i += 1
                            $ class_ = ''
                            $if i == lt:
                                $ class_ = ' class="last_one"'
                            <dd$:class_>
                                <span class="idx_tp_l tr mr_10">
                                    <b class="price_idx">$:moneyfmt(post.price, initial = post.is_initial_price)</b>
                                </span>
                                <span class="idx_tp_r">
                                    <a href="/discounts/$post.id" directing="$post.directing" lightning="$post.lightning"><b>$:post.title</b></a><br />
                                        <div class="rating" rating="$post.price_index" ratio="2"></div>
                                        <em class="gray">»$:post.partner_name</em>
                                </span>
                            </dd>
                    </dl>
                </div>
			    <!--idx_wp_box End-->
        </div>
        <!--cnt_box End-->
        <div class="side_r_box">
            <div class="idx_wp_box">
                <form id="subscribe_form" action="/subscribe" method="get">
				<h2 class="idx_wp_tit">免费订阅</h2>
				<p class="ask_third">
					<em>每周一期特惠专刊，不再错过超值旅游！</em>
					<input type="email" required="required" name="email" init-value="请输入Email..." class="big_inp" />
                    <input type="hidden" name="source" value="discounts" />
				</p>
				<p class="t_c">
					<a href="javascript:;" class="eml_rss_btn"><b>订阅</b></a>
				</p>
                </form>
			</div>
			<!--idx_wp_box End-->
            $if last_top10:
                <div class="idx_wp_box">
                    <h2 class="idx_wp_tit">往期甄选TOP10</h2>
                    <ul class="his_lst">
                    $for post in last_top10:
                        <li><a href="$path?date=$post.date">$:int2date(post.date, '%(month)s月%(day)s日')&gt;&gt;</a></li>
                    </ul>
                </div>
                <!--idx_wp_box End-->
		</div>
		<!--side_r_box End-->
	</div>
	<!--wrap End-->
</div>
</div>
<!--content End-->

$:frender.footer()
